import java.util.Scanner;

public class Test {
    public static int add(int x){
        if(x==1){
            return 1;
        }else{
            return x * add(x-1);
        }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();;
        int ret = add(n);
        System.out.println(ret);
    }
}
